package com.example.gateway.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

/**
 * @author kangshuai
 */
@RestController
public class TestController {

    @Resource
    private SampleService sampleService;

    @GetMapping("/api/test")
    public Map<String, Object> test() throws Exception {
        sampleService.createOrder();
        Map<String, Object> map = new HashMap<>();
        map.put("code", 0);
        map.put("message", "order created!");
        return map;
    }
}
